﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;

namespace DatingWebSite.Pages
{
    public partial class membersearch : System.Web.UI.Page
    {

        Hashtable htFilters;
        Hashtable htAdvFilters;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                txtSearchZipPostalCode.Text = "";
            }


        }



        protected void btnSearch_Click(object sender, ImageClickEventArgs e)
        {

            htFilters = new Hashtable();
            htFilters.Add("ddlgender", ddlgender.SelectedValue.ToString());
            htFilters.Add("ddlMinAge", ddlMinAge.SelectedValue.ToString());
            htFilters.Add("ddlMaxAge", ddlMaxAge.SelectedValue.ToString());
            htFilters.Add("ddlLocation", ddlLocation.SelectedValue.ToString());
            htFilters.Add("CheckBoxProfilesWith", CheckBoxProfilesWith.SelectedValue.ToString());
            htFilters.Add("rdDisplay", rdDisplay.SelectedValue.ToString());

            if (txtSearchZipPostalCode.Text.Trim() != "")
            {
                htFilters.Add("txtSearchZipPostalCode", txtSearchZipPostalCode.Text.Trim());
            }
            else
            {
                htFilters.Add("txtSearchZipPostalCode", "");
            }

            Session.Add("htBasicFilters", htFilters);

            Response.Redirect("searchresult.aspx");

        }

        protected void btnAdvanceSearc_Click(object sender, ImageClickEventArgs e)
        {
            htAdvFilters = new Hashtable();

            htAdvFilters.Add("chkMaritalStatus", chkMaritalStatus.SelectedValue.ToString());
            htAdvFilters.Add("chkEthnicity", chkEthnicity.SelectedValue.ToString());
            htAdvFilters.Add("chkRelationshipExpectations", chkRelationshipExpectations.SelectedValue.ToString());
            htAdvFilters.Add("chkZodiac", chkZodiac.SelectedValue.ToString());
            htAdvFilters.Add("chkSmokingPreference", chkSmokingPreference.SelectedValue.ToString());
            htAdvFilters.Add("ddlMinHeight", ddlMinHeight.SelectedValue.ToString());
            htAdvFilters.Add("ddlMaxHeight", ddlMaxHeight.SelectedValue.ToString());
            htAdvFilters.Add("ddlMaxHeight", ddlMaxHeight.SelectedValue.ToString());
            htAdvFilters.Add("chkGeneralBuild", chkGeneralBuild.SelectedValue.ToString());
            htAdvFilters.Add("ddlOccupation", ddlOccupation.SelectedItem.ToString());
            htAdvFilters.Add("chkchildren", chkchildren.SelectedValue.ToString());
            htAdvFilters.Add("chkReligion", chkReligion.SelectedValue.ToString());
            htAdvFilters.Add("ddlLoggedIn", ddlLoggedIn.SelectedValue.ToString());
            htAdvFilters.Add("ddlNewMembers", ddlNewMembers.SelectedValue.ToString());
            htAdvFilters.Add("ddlNewPhotos", ddlNewPhotos.SelectedValue.ToString());
            htAdvFilters.Add("ddlProfilePerPage", ddlProfilePerPage.SelectedValue.ToString());
            htAdvFilters.Add("ddlProfilePerPage", ddlProfilePerPage.SelectedValue.ToString());


            Session.Add("htAdvFilters", htAdvFilters);

            Response.Redirect("searchresult.aspx");




        }
    }
}
